import React from 'react';
//重定向到那个页面
import {Redirect} from 'react-router-dom'
import {connect} from "react-redux"
class Write extends React.Component {
    render() {
        const{ login}=this.props;
        if(login){
            return(
                <div>写文章页面</div>
            )
        }else{
            return <Redirect to='/login'/>
        }
    }
};

const mapState = (state) => ({
    login:state.getIn(['login','login'])
});
const mapDispatch=(dispatch)=>({

});
export default connect(mapState, mapDispatch)(Write)
